<html><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<head>
<title>DDL 倒计时</title>
<style>
/*reset*/
html {    color: #000000;    line-height: 1.5;}
body {    font: 12px/1.5 arial,sans-serif; background:#efefef}
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td {
    margin: 0;    padding: 0;}
ol, ul {    list-style: none outside none;}
h1, h2, h3, h4, h5, h6 {    font-size: 100%;    font-weight: normal;}

a {    text-decoration: none;}
*::-moz-placeholder {    color: #CCCCCC;}

#wrap {   word-break: break-all;    word-wrap: break-word;
    margin:0 auto; padding:50px; border:#fff 5px solid; display:solid;
    width:990px;
    padding:35px;}

/*计时器区域总体样式*/
#my_timer {
	color: #666666;

	/*
	font-size: 12px;
	padding: 4px;
	*/

	text-align: center;
	font: 14px/1.3 'Segoe UI',Arial, sans-serif;
	text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3);

	width:420px; height:40px;
	padding:20px;  margin: 10px auto;
	border-radius:20px;

	border:2px solid #FE0859;
	background:#afafaf;
	box-shadow:1px 1px 1px rgba(4, 4, 4, 0.35);
}


#my_timer:hover{
	color:#fff;
	text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
	background:#FE0859;
}

/*计时器数字的样式*/
.timer{ font:20px arial; margin:0 5px;}

.timer,
.digit{
    display:inline-block;
    width:2em;
    background-color:#444;
    border-radius:0.2em;
    text-align:center;
    color:#fff;
    letter-spacing:-1px;
}

.timer,
.digit.static{
    box-shadow:1px 1px 1px rgba(4, 4, 4, 0.35);

    background-image: linear-gradient(bottom, #3A3A3A 50%, #444444 50%);
    background-image: -o-linear-gradient(bottom, #3A3A3A 50%, #444444 50%);
    background-image: -moz-linear-gradient(bottom, #3A3A3A 50%, #444444 50%);
    background-image: -webkit-linear-gradient(bottom, #3A3A3A 50%, #444444 50%);
    background-image: -ms-linear-gradient(bottom, #3A3A3A 50%, #444444 50%);

    background-image: -webkit-gradient(
        linear,
        left bottom,
        left top,
        color-stop(0.5, #3A3A3A),
        color-stop(0.5, #444444)
    );
}
</style></head>
<body>
<!-- clear:both; -->
<div style="display:block; clear:both; overflow:hidden; height:20px;"></div>

<!-- 倒计时区域 -->
<div id="my_timer"></div>
<script type="text/javascript">
/************************
预先定义的函数和常数 
*************************/
var my_insert=document.getElementById("my_timer");
var ddl= new Date("Feb 25, 2025 00:00:00");  //new Date("Jan 4,2014 8:30:00")
var ddl_name = "青年基金提交"; //2023.8.24 开榜


//主函数
function getTimer(){
    window.setTimeout("getTimer()", 1000);

	var now = new Date(); //当前时间
	var ts = ddl - now;  //计算剩余的毫秒数
    var dd = parseInt(ts / 1000 / 60 / 60 / 24, 10); //计算剩余的天数
    var hh = parseInt(ts / 1000 / 60 / 60 % 24, 10);//计算剩余的小时数
    var mm = parseInt(ts / 1000 / 60 % 60, 10);//计算剩余的分钟数
    var ss = parseInt(ts / 1000 % 60, 10);//计算剩余的秒数

    var dd = checkTime(dd); //console.log(dd);
    var hh = checkTime(hh);
    var mm = checkTime(mm);
    var ss = checkTime(ss);

    var my_string = "<p class=>今天是"+now + " <br />" +"距"+ ddl_name +"还有<span class=timer>";
    my_string += dd+"</span>天<span class=timer>"+hh+"</span>小时<span class=timer>"+mm+"</span>分<span class=timer>"+ss+"</span>秒";

    document.getElementById("my_timer").innerHTML = my_string;
}

function checkTime(i){
       if (i < 10) {
          i= "0" + i;
        }
        return i;
}

getTimer();
</script>
</body></html>